package com.zqli.controller;

import com.zqli.entity.ChatBot;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("demo")
@RestController
public class DemoController {

    @Value("${demo.message}")
    private String message;

    @Value("${demo.url}")
    private String url;

    @GetMapping("/config")
    public String getConfig() {
        ChatBot chatBot = new ChatBot();
        chatBot.setId("1");
        System.out.println(chatBot);
        return message + " " + url;
    }

}
